package com.kitty.game.wawa.facade;

import com.kitty.game.role.model.Role;
import com.kitty.game.wawa.message.ReqChildRequestInfo;
import com.kitty.game.wawa.message.RespChildInfo;
import com.kitty.game.welfare.message.ReqGetActiveBonusInfo;
import com.kitty.game.welfare.message.RespActiveBonusInfo;
import com.kitty.mina.annotation.RequestMapping;
import com.kitty.mina.message.MessagePusher;
import org.apache.mina.core.session.IoSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;


@Controller
public class WawaController {
    Logger logger = LoggerFactory.getLogger(WawaController.class);


    /**
     * 请求养育娃娃信息
     * @param role
     * @param reqChildRequestInfo
     */
    @RequestMapping
    public void reqChildRequestInfo(Role role, ReqChildRequestInfo reqChildRequestInfo) {

        logger.debug("role_name:"+role.getName()+",居所信息:");
        RespChildInfo respChildInfo =new RespChildInfo();
        respChildInfo.setIsForceOpen((byte) 0);
        respChildInfo.setSelectId("");

        MessagePusher.pushMessage(role, respChildInfo);
    }


    @RequestMapping
    public void activeBonusInfo(IoSession session, ReqGetActiveBonusInfo reqGetActiveBonusInfo) {
        MessagePusher.pushMessage(session, new RespActiveBonusInfo());
    }


}
